package com.company.manage.system.entity;

import com.company.manage.common.base.BaseEntity;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.*;

import static javax.persistence.GenerationType.IDENTITY;

/**
 * Created by HuangYong on 2016/1/22.
 * desc: 字典 entity
 */

@Entity
@Table(name = "t_dict")
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
@DynamicUpdate
@DynamicInsert
public class Dict extends BaseEntity {
    private static final String TAG = "Dict";

    private static final long serialVersionUID = -874989543105409556L;

    @Id @GeneratedValue(strategy = IDENTITY)
    @Column(name = "ID",unique = true,nullable = false)
    private Integer id;

    @Column(name = "LABEL")
    private String label;

    @Column(name = "VALUE")
    private String value;

    @Column(name = "TYPE")
    private String type;

    @Column(name = "DESCRIPTION")
    private String description;

    @Column(name = "SORT")
    private String sort;

    @Column(name = "REMARK")
    private String remark;

    @Column(name = "DEL_FLAG")
    private String delFlag; //0 是未删除，1是删除

    public Dict() {
    }

    public Dict(Integer id, String label, String value, String type, String description, String sort, String remark, String delFlag) {
        this.id = id;
        this.label = label;
        this.value = value;
        this.type = type;
        this.description = description;
        this.sort = sort;
        this.remark = remark;
        this.delFlag = delFlag;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getLabel() {
        return label;
    }

    public void setLabel(String label) {
        this.label = label;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getSort() {
        return sort;
    }

    public void setSort(String sort) {
        this.sort = sort;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public String getDelFlag() {
        return delFlag;
    }

    public void setDelFlag(String delFlag) {
        this.delFlag = delFlag;
    }
}


